Class BetweennessCentrality
java.lang.Object
edu.claflin.finder.algo.clustering.struct.girvan_newman_struct.BetweennessCentrality
Computes betweenness centrality for each vertex and edge in the graph.
- See Also:
-
- "Ulrik Brandes: A Faster Algorithm for Betweenness Centrality. Journal of Mathematical Sociology 25(2):163-177, 2001."
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Graphprotected Map<Node,BetweennessCentrality.BetweennessData> protected boolean -
Constructor Summary
ConstructorsConstructorDescriptionBetweennessCentrality(Graph graph, boolean weighted) Calculates betweenness scores based on the all-pairs unweighted shortest paths in the graph. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomputeBetweenness(Queue<Node> queue) getEdgeScore(Edge e) protected void
-
Field Details
-
graph
-
weighted
protected boolean weighted -
vertex_scores
-
edge_scores
-
vertex_data
-
-
Constructor Details
-
BetweennessCentrality
Calculates betweenness scores based on the all-pairs unweighted shortest paths in the graph.- Parameters:
graph- the the graph to calculate betweenness centralityweighted- whether to consider edge weights
-
-
Method Details
-
initialize
protected void initialize() -
computeBetweenness
-
getVertexScore
-
getEdgeScore
-